package com.cz.zslu.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.cz.zslu.entity.SysUser;
import com.cz.zslu.mapper.SysUserMapper;
import com.cz.zslu.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统用户 服务实现类
 * </p>
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Autowired
    private ISysUserService iSysUserService;

    @Override
    public SysUser selectByToken(String token) {
        SysUser info = iSysUserService.selectOne(new EntityWrapper<SysUser>().eq("token", token));
        return info;
    }
}
